Skip to content

Conversation

@javuto
Copy link
Collaborator

@javuto javuto commented Dec 25, 2025

Fixed all lint errors and updated the pre-commit configuration for golangci-lint

@javuto javuto requested a review from Copilot December 25, 2025 18:58
@javuto javuto added the cicd CICD related issues label Dec 25, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses all golangci-lint errors by simplifying variable declarations, replacing format strings with standard library functions, and updating the pre-commit configuration to use the official golangci-lint repository.

Key changes:

  • Simplified redundant variable type declarations to use short declaration syntax
  • Replaced fmt.Sprintf with more appropriate functions (fmt.Fprintf and net.JoinHostPort)
  • Removed unused constant and updated pre-commit hooks configuration

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/utils/utils.go Replaced fmt.Sprintf with fmt.Fprintf for writing to hasher
pkg/users/users.go Simplified variable declaration from explicit type to short form
pkg/tags/tags.go Simplified variable declaration from explicit type to short form
pkg/settings/settings.go Simplified variable declaration from explicit type to short form
pkg/nodes/nodes.go Simplified variable declaration from explicit type to short form
pkg/logging/logstash.go Replaced format string with net.JoinHostPort and removed unused constant
pkg/environments/environments.go Simplified variable declaration from explicit type to short form
pkg/carves/carves.go Simplified variable declaration from explicit type to short form
pkg/auditlog/audit.go Simplified variable declaration from explicit type to short form
cmd/cli/query.go Changed switch statement from condition-based to expression-based
cmd/admin/sessions/sessions.go Fixed capitalization in error messages to follow Go conventions
cmd/admin/handlers/utils.go Reordered imports alphabetically and replaced fmt.Sprintf with fmt.Fprintf
.pre-commit-config.yaml Updated golangci-lint configuration to use official repository

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@javuto javuto merged commit 3a17a8d into main Dec 25, 2025
55 checks passed
@javuto javuto deleted the fix-golangci-lint-errors branch December 25, 2025 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cicd CICD related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants